package repository

type keyOptions struct {
	options []*keyOption
}

func (t *keyOptions) Put(fieldName string, value interface{}) *keyOptions {
	if t.options == nil {
		t.options = make([]*keyOption, 0)
	}
	var option keyOption
	option.fieldName = fieldName
	option.value = value
	t.options = append(t.options, &option)
	return t
}

func (t *keyOptions) IsEmpty() bool {
	return len(t.options) <= 0
}

func (t *keyOptions) KeyValues() []interface{} {
	values := make([]interface{}, 0)
	for _, option := range t.options {
		values = append(values, option.value)
	}
	return values
}

type keyOption struct {
	fieldName string
	value     interface{}
}
